<!-- 
/**
 * 数据库实例 列表页 JS 脚本
 * @author 金杰 , maillank@qq.com
 * @since 2021-10-26 15:28:23
 */
 -->
 <!DOCTYPE html>
<html style="background-color: #FFFFFF;">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
	<title th:text="${lang.translate('数据库实例')}">数据库实例</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css" th:href="'/assets/libs/layui/css/layui.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/css/admin.css" th:href="'/assets/css/admin.css?'+${cacheKey}"/>
    <link rel="stylesheet" href="/assets/libs/toast/css/toast.css" type="text/css" th:href="'/assets/libs/toast/css/toast.css?'+${cacheKey}">
    <link rel="stylesheet" href="/assets/css/foxnic-web.css" th:href="'/assets/css/foxnic-web.css?'+${cacheKey}"/>
    <link href="/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css" th:href="@{/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css}" rel="stylesheet"/>
    <script th:inline="javascript">var foxnic_cachekey=[[${cacheKey}]];</script>    <link th:if(theme.ico!="null") rel="shortcut icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon"> <link th:if(theme.ico!="null") rel="icon" th:href="theme.ico" type="image/vnd.microsoft.icon">
    <link th:each="css:${theme.css}" rel="stylesheet" th:href="${css}+'?'+${cacheKey}">
    <style>
    </style>
</head>

<body style="overflow-y: hidden;">
<div class="form-container" >

    <form id="data-form" lay-filter="data-form" class="layui-form model-form" style="display:none">

        <input name="id" id="id"  type="hidden"/>

         <!--开始：group 循环-->



        <div class="layui-row form-row">

             <!--开始：group 循环-->
            <div class="layui-col-xs4 form-column">


                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('主机')}">主机</div><div class="layui-required">*</div></div>
                        <div class="layui-input-block ">
                            <div id="hostId" input-type="select" th:data="${'/service-ops/ops-host/query-paged-list'}"></div>
                        </div>
                    </div>


                
                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('备份状态')}">备份状态</div></div>
                        <div class="layui-input-block ">
                            <div id="backupStatus" input-type="select" th:data="${dict.toArray('ops_db_backup_status')}"></div>
                        </div>
                    </div>


                
                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('日志模式')}">日志模式</div></div>
                        <div class="layui-input-block ">
                            <div id="logMethod" input-type="select" th:data="${dict.toArray('ops_db_log_method')}"></div>
                        </div>
                    </div>


                
                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('备份状态')}">备份状态</div></div>
                        <div class="layui-input-block ">
                            <div id="backupType" input-type="select" th:data="${dict.toArray('ops_db_backup_type')}"></div>
                        </div>
                    </div>


                <!--结束：栏次内字段循环-->
            </div>
             <!--开始：group 循环-->
            <div class="layui-col-xs4 form-column">


                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('数据库')}">数据库</div><div class="layui-required">*</div></div>
                        <div class="layui-input-block ">
                            <div id="databaseId" input-type="select" th:data="${'/service-ops/ops-service-info/query-list'}"></div>
                        </div>
                    </div>


                                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('实例名称')}">实例名称</div><div class="layui-required">*</div></div>
                        <div class="layui-input-block ">
                            <input lay-filter="name" id="name" name="name" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('实例名称') }" type="text" class="layui-input"    lay-verify="|required"  />
                        </div>
                    </div>

                
                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('备份时间')}">备份时间</div></div>
                        <div class="layui-input-block ">
                            <input input-type="date" lay-filter="backupTime" id="backupTime" name="backupTime"  autocomplete="off"  readonly  th:placeholder="${ lang.translate('请选择') +''+ lang.translate('备份时间') }" type="text" class="layui-input"    lay-verify=""   />
                        </div>
                    </div>

                                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('备份策略')}">备份策略</div></div>
                        <div class="layui-input-block ">
                            <input lay-filter="backupStrategy" id="backupStrategy" name="backupStrategy" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('备份策略') }" type="text" class="layui-input"  />
                        </div>
                    </div>

                <!--结束：栏次内字段循环-->
            </div>
             <!--开始：group 循环-->
            <div class="layui-col-xs4 form-column">


                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('备份方式')}">备份方式</div></div>
                        <div class="layui-input-block ">
                            <div id="backupMethod" input-type="select" th:data="${dict.toArray('ops_db_backup_method')}"></div>
                        </div>
                    </div>


                
                    <div class="layui-form-item" >
                        <div class="layui-form-label "><div th:text="${lang.translate('备份大小')}">备份大小</div></div>
                        <div class="layui-input-block ">
                            <input lay-filter="backupSize" id="backupSize" name="backupSize" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('备份大小') }" type="text" class="layui-input"   autocomplete="off" input-type="number_input" integer="false" decimal="true" allow-negative="false" step="1.0"   scale="2" />
                        </div>
                    </div>


                <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
         <!--开始：group 循环-->



        <div class="layui-row form-row">

             <!--开始：group 循环-->
            <div class="layui-col-xs12 form-column">


                    <div class="layui-form-item" >
                    <div class="layui-form-label "><div th:text="${lang.translate('备注')}">备注</div></div>
                    <div class="layui-input-block ">
                        <textarea lay-filter="notes" id="notes" name="notes" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('备注') }" class="layui-textarea" style="height: 120px" ></textarea>
                    </div>
                </div>


                <!--结束：栏次内字段循环-->
            </div>
            <!--结束：栏次输入框循环-->
        </div>
        <!--结束：group循环-->

        <div style="height: 8px"></div>
        <div style="height: 150px"></div>


    </form>

</div>
<div class="model-form-footer">
    <button class="layui-btn layui-btn-primary" id="cancel-button" lay-filter="cancel-button" type="button" th:text="${lang.translate('取消')}" >取消</button>
    <button th:if="${perm.checkAnyAuth('ops_db_instance:create','ops_db_instance:update','ops_db_instance:save')}" class="layui-btn" style="margin-right: 15px;display: none;"  id="submit-button" lay-filter="submit-button" lay-submit th:text="${lang.translate('保存')}">保存</button>
</div>

<script type="text/javascript" src="/module/global.js" th:src="'/module/global.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js" th:src="'/assets/libs/jquery-3.2.1.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js" th:src="'/assets/libs/pandyle.min.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js" th:src="'/assets/libs/layui/layui.js?'+${cacheKey}"></script>
<script type="text/javascript" src="/assets/libs/toast/js/toast.js" th:src="'/assets/libs/toast/js/toast.js?'+${cacheKey}"></script>

<script th:inline="javascript">
    var LAYUI_TABLE_WIDTH_CONFIG = [[${layuiTableWidthConfig}]];
    var SELECT_LOGMETHOD_DATA = [[${dict.toArray('ops_db_log_method')}]];
    var SELECT_BACKUPTYPE_DATA = [[${dict.toArray('ops_db_backup_type')}]];
    var SELECT_BACKUPSTATUS_DATA = [[${dict.toArray('ops_db_backup_status')}]];
    var SELECT_BACKUPMETHOD_DATA = [[${dict.toArray('ops_db_backup_method')}]];
    var VALIDATE_CONFIG={"name":{"labelInForm":"实例名称","inputType":"text_input","required":true},"hostId":{"labelInForm":"主机","inputType":"select_box","required":true},"databaseId":{"labelInForm":"数据库","inputType":"select_box","required":true},"backupTime":{"date":true,"labelInForm":"备份时间","inputType":"date_input"}};
    var AUTH_PREFIX="ops_db_instance";


</script>



<script th:src="'/business/ops/db_instance/db_instance_ext.js?'+${cacheKey}"></script>
<script th:src="'/business/ops/db_instance/db_instance_form.js?'+${cacheKey}"></script>

</body>
</html>